<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style>
		.box1{
			width: 150px;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
		}
		.box2,
		.box2-1 {
			width: 120px;
			height: 30px;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
		}
		.box2-1{
			width: 220px;
		}
		.span1{
			color: red;
		}
	</style>
</head>

<body>
	<h3>一个元素内容的超出</h1>
	<div class="box1">实践活动金黄色的就发货手机打发卡机受打击开发</div>
	<hr/>
	<h3>多个行内元素内容的超出</h3>
	<div class="box2">
		<i class="span1">span1span1span1</i>
		<button class="span2">span2span2span2span2</button>
	</div>
	<div class="box2-1">
		<span class="span1">span1span1span1</span>
		<span class="span2">span2span2span2span2</span>
	</div>
	<div class="box2-1">
		<span class="span1">span1span1span1</span>
		<button class="span2">span2span2span2span2</button>
	</div>
</body>

</html>